import request from '@/utils/request'

// 查询库区信息管理列表
export function listArea(query) {
  return request({
    url: '/storage/area/list',
    method: 'get',
    params: query
  })
}

// 查询库区信息管理详细
export function getArea(id) {
  return request({
    url: '/storage/area/' + id,
    method: 'get'
  })
}

// 新增库区信息管理
export function addArea(data) {
  return request({
    url: '/storage/area',
    method: 'post',
    data: data
  })
}

// 修改库区信息管理
export function updateArea(data) {
  return request({
    url: '/storage/area',
    method: 'put',
    data: data
  })
}

// 删除库区信息管理
export function delArea(id) {
  return request({
    url: '/storage/area/' + id,
    method: 'delete'
  })
}

// 查询仓库表中信息
export function getWarehouse() {
  return request({
    url: '/storage/area'+'/warehouse',
    method: 'get',
  })
}

//查询仓库表中id和仓库名称
export function getWarehouseOfIdAndName(warehouseId) {
  return request({
    url: '/storage/area'+'/warehouseOfIdAndName/'+ warehouseId,
    method: 'get',
  })
}

